home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group93c.txt / 000125_icon-group-sender _Thu Dec 16 17:33:48 1993.msg < prev    next >
Internet Message Format  |  1994-02-02  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Thu, 16 Dec 1993 23:04:45 MST
  2. Date: Thu, 16 Dec 1993 17:33:48 +0700
  3. From: gmt (Gregg Townsend)
  4. Message-Id: <9312170033.AA01119@owl.cs.arizona.edu>
  5. To: icon-group, norm@ora.com
  6. Subject: Re: Multiple fonts in vidgets?
  7. Content-Length: 1119
  8. Status: R
  9. Errors-To: icon-group-errors@cs.arizona.edu
  10.  
  11.     Date: 13 Dec 93 18:56:28 GMT
  12.     From: Norman Walsh
  13.  
  14.     Is it possible to create vidgets with different fonts?  For example, I
  15.     would like to use one font for button labels, another for messages,
  16.     another for labels and (yet) another for label entries.
  17.  
  18. The trick is to use a new binding for those vidgets.  Below is a simplified
  19. example without error checking that creates buttons with different fonts.
  20.  
  21.     Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
  22.     +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m
  23.  
  24.  ------------------------------------------------------------------------------
  25.  
  26. link vidgets, vbuttons
  27.  
  28. procedure main()
  29.    local win, root
  30.  
  31.    win := open("buttons", "x")
  32.    root := Vroot_frame(win)
  33.    Vbutton(root, 10, 10, win, "one", cb, 1)
  34.    Vbutton(root, 10, 40, XBind(win, "font=helvetica-bold-14"), "two", cb, 2)
  35.    Vbutton(root, 10, 70, XBind(win, "font=palatino-roman-14"), "three", cb, 3)
  36.    Vbutton(root, 10,100, win, "four", cb, 4)
  37.    VResize(root)
  38.    GetEvents(root)
  39. end
  40.  
  41. procedure cb(vid, val)
  42.    write("button ", vid.id)
  43. end
  44.